package com.bsoft.gol.hbs.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import hcn.base.message.HiSysMsgTplEntity;

import java.util.List;

/**
 * @description:消息管理升级Dao层
 * @author: zhengcb10708
 * @create: 2022-01-20 14:37
 **/
public abstract class HiSysMsgTplDao  extends HibernateSupportDelegateDAO<HiSysMsgTplEntity> {
    public HiSysMsgTplDao() {
        this.setKeyField("id");
    }

    @DAOMethod(sql = "from HiSysMsgTplEntity where id=:id")
    public abstract HiSysMsgTplEntity getHiSysMsgTpl(@DAOParam("id") String id);

    @DAOMethod(sql = "from HiSysMsgTplEntity where cd=:cd")
    public abstract List<HiSysMsgTplEntity> findHiSysMsgTplList(@DAOParam("cd") String cd);

    @DAOMethod(sql = "from HiSysMsgTplEntity where sdTpl=:sdTpl and cd=:cd")
    public abstract List<HiSysMsgTplEntity> findHiSysMsgTplListByParams(@DAOParam("sdTpl") Byte sdTpl,@DAOParam("cd") String cd);

}
